package com.omega.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.omega.dao.ItemReceivedDao;
import com.omega.entity.ItemReceived;

@Repository
public class ItemReceivedDaoImpl extends GenericDaoImpl<ItemReceived> implements
		ItemReceivedDao {

	public ItemReceivedDaoImpl() {
		super();
		setClazz(ItemReceived.class);
	}

	@Override
	public void addReceiveditem(ItemReceived itemReceived) {
		save(itemReceived);
	}

	@Override
	public List<ItemReceived> loadAllReceivedItems() {
		return loadAll();
	}

	@Override
	public ItemReceived loadById(long itemReceivedId) {
		return loadByid(itemReceivedId);
	}

	@Override
	public void updateItemReceived(ItemReceived itemReceived) {
		update(itemReceived);

	}

	@Override
	public void deleteItemReceived(long itemReceivedId) {
		ItemReceived entity = loadById(itemReceivedId);
		delete(entity);
	}
}
